<html>
<head><meta charset="utf-8"><title>missing specialization · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/missing.20specialization.html">missing specialization</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203046955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/missing%20specialization/near/203046955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/missing.20specialization.html#203046955">(Jul 06 2020 at 22:12)</a>:</h4>
<p>While implementing <a href="https://github.com/rust-lang/rust/pull/74113">https://github.com/rust-lang/rust/pull/74113</a> I had to revert part of <a href="https://github.com/rust-lang/rust/pull/70674">https://github.com/rust-lang/rust/pull/70674</a><br>
which ended up causing the following ICE:</p>
<div class="codehilite"><pre><span></span><code>thread &#39;rustc&#39; panicked at &#39;missing specialization: `&lt;rustc_middle::ty::query::on_disk_cache::CacheDecoder as SpecializedDecoder&lt;&amp;rustc_middle::mir::Body&gt;&gt;::specialized_decode` not overridden&#39;, /home/lcnr/rust4/src/libstd/macros.rs:16:9
</code></pre></div>



<a name="203046991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/missing%20specialization/near/203046991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/missing.20specialization.html#203046991">(Jul 06 2020 at 22:13)</a>:</h4>
<p>Afaict <code>UseSpecializedDecode</code> is not implemented for <code>&amp;'tcx Body</code>, so I can't really tell where this ICE is coming from/what I have to do here</p>



<a name="203047031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/missing%20specialization/near/203047031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/missing.20specialization.html#203047031">(Jul 06 2020 at 22:13)</a>:</h4>
<p><code>UseSpecializedDecode</code> is implemented for <code>&amp;T</code>.</p>



<a name="203047208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/missing%20specialization/near/203047208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/missing.20specialization.html#203047208">(Jul 06 2020 at 22:15)</a>:</h4>
<p>I still don't know what I missed from <a href="https://github.com/rust-lang/rust/issues/70674">#70674</a> though :/ Do we now have to manually implement <code>SpecializedDecodable</code> for arena allocated structs?</p>



<a name="203047341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/missing%20specialization/near/203047341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/missing.20specialization.html#203047341">(Jul 06 2020 at 22:17)</a>:</h4>
<p>You need to add <code>decode</code> in the macro in <code>rustc_middle::arena</code></p>



<a name="203047408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/missing%20specialization/near/203047408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/missing.20specialization.html#203047408">(Jul 06 2020 at 22:17)</a>:</h4>
<p>Thanks <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>